import List from './goods/list'
import Add from './goods/add'
import { Route, Redirect, Switch } from 'react-router-dom'
import Edit from './goods/edit'
import React from 'react'
function goods(props) {
	console.log('ine=ter', props)
	const baserurl = props.match.path

	return (
		<div>
			<Switch>
				<Route path={baserurl + '/list'} component={List}></Route>
				<Route path={baserurl + '/add'} component={Add}></Route>
				<Route path={baserurl + '/edit/:id'} component={Edit}></Route>
				<Redirect to={baserurl + '/list'}></Redirect>
			</Switch>
		</div>
	)
}
export default goods
